-
Notifications
You must be signed in to change notification settings - Fork 13.3k
std: Implement lowering and raising for process IO #25494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @aturon |
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
0f35ebc
to
af69f4e
Compare
This commit implements a number of standard traits for the standard library's process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the `Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the `Child{Stdout,Stdin,Stderr}` types. Additionally this implements the `AsRawHandle` trait for `Child` on Windows. The stability markers for these implementations mention that they are stable for 1.1 as I will nominate this commit for cherry-picking to beta.
b3db491
to
3dd3450
Compare
ping r? @aturon |
/// Note that this function **does not** take ownership of the file | ||
/// descriptor provided and it will **not** be closed when `Stdio` goes out | ||
/// of scope. As a result this method is unsafe because due to the lack of | ||
/// knowledge about the lifetime of the provided file descriptor, this could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel slightly uneasy about this comment, as it directly contradicts the documentation for the trait.
It would be good to be more crisp about the story here.
@bors: r+ |
📌 Commit 3dd3450 has been approved by |
(I'm assuming we still intend to backport; if not, feel free to r- and update stability markers.) |
This commit implements a number of standard traits for the standard library's process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the `Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the `Child{Stdout,Stdin,Stderr}` types. The stability markers for these implementations mention that they are stable for 1.1 as I will nominate this commit for cherry-picking to beta.
triage: not accepted for beta |
…=brson * Slate these features to be stable in 1.2 instead of 1.1 (not being backported) * Have the `FromRawFd` implementations follow the contract of the `FromRawFd` trait by taking ownership of the primitive specified. * Refactor the implementations slightly to remove the `unreachable!` blocks as well as separating the stdio representation of `std::process` from `std::sys::process`. cc #25494
This commit implements a number of standard traits for the standard library's
process I/O handles. The
FromRaw{Fd,Handle}
traits are now implemented for theStdio
type and theAsRaw{Fd,Handle}
traits are now implemented for theChild{Stdout,Stdin,Stderr}
types.The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.